In many data transfer networks there is a need for synchronizing the time of day values maintained in the network elements in such a way that the time of day values of various network elements are equal to each other as accurately as possible. In other words, the time of day values maintained in various network elements should indicate a common time of day as accurately as possible. Said common time of day is generally referred to as universal wall clock time. Said network elements can be, for example, routers or base stations of a mobile telephone network. For example, in mobile telephone networks of the new generation, a prerequisite for the reliable data transfer between a mobile telephone moving from the service area of a base station to the service area of another base station and the base station network is that the base stations conform to a common time concept with a sufficient accuracy.
In one prior art solution, network elements send timestamp messages to each other, based on which each network element adjusts the time of day value it maintains. For illustrating the synchronization activity based on timestamps, two network elements A and B are examined. We assume that the network element A sends a timestamp message V1 to the network element B at a time when the time of day value of the network element A is t1. In other words, said timestamp message V1 includes the time of day value t1. The network element B receives said timestamp message V1 at a time when the time of day value of the network element B is t2. The difference t2−t1 includes two components, which are the difference of the time of day values Ds1 of the network elements A and B at the sending time of the timestamp message V1 and the transfer delay S1 of the timestamp message V1 from the network element A to the network element B. That is, t2−t1=Ds1+S1. In the above equation said transfer delay S1 is assumed to be indicated in the network element B as a change of the measured time of day. We assume that the network element B sends a timestamp message V2 to the network element A at a time when the time of day value of the network element B is t3. In other words, said timestamp message V2 includes the time of day value t3. The network element A receives said timestamp message V2 at a time when the time of day value of the network element A is t4. The difference t4−t3 includes two components, which are the difference of the time of day values Ds2 of the network elements B and A at the sending time of the timestamp message V2 and the transfer delay S2 of the timestamp message from the network element B to the network element A. That is, t4−t3=Ds2+S2. In the above equation said transfer delay S2 is assumed to be indicated in the network element A as a change of the measured time of day. In case the transfer delays S1 and S2 are mutually equal and the difference between the time of day values of the network elements A and B does not change between the sending times of the timestamp messages V1 and V2, the difference between the action steps can be calculated as follows:
                              Ds          =                                                    (                                                      t                    ⁢                                                                                  ⁢                    2                                    -                                      t                    ⁢                                                                                  ⁢                    1                                                  )                            -                              (                                                      t                    ⁢                                                                                  ⁢                    4                                    -                                      t                    ⁢                                                                                  ⁢                    3                                                  )                                      2                          ,                            (        1        )            where Ds=Ds1=−Ds2. In case the time of day value t2 is sent from the network element B to the network element A, the network element A is capable of calculating, with Equation (1), how much the time of day value of the network element A differs from the time of day value of the network element B.
In packet-switched, frame-switched or cell-switched data transfer networks the above mentioned timestamp messages are transferred between various network elements as data packets, data frames of data cells. As described above, the calculation of the difference between time of day values using Equation (1) is based on assumptions that the difference between the time of day values of various network elements does not change between the sending times of the timestamp messages and that the transfer delays to various directions are mutually equal. Modern clockworks are generally of such a good quality that the assumption about the difference between the time of day values usually holds true very well. Instead in packet-switched, frame-switched and cell-switched data transfer networks, the assumption related to the transfer delay does not often hold true with a sufficient accuracy, since the transfer delay has a remarkable random-type portion and, in addition, data transfer paths between two network elements, routed to opposite transfer directions, can have a different length relative to each other. Said random-type portion is due to, for example, queue delays subjected to data packets, data frames or data cells in the transmission buffers and/or reception buffers.